import request from '@/utils/request';

// 活动列表-裂变引流
export function getFissionList(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/list',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
// 引流成员弹窗
export function getEmployeeList() {
    return request({
        url: '/scrm-api/console/market/fission/get-employee',
        method: 'get',
        noNeedLoading: true
    });
}

// 下载/批量下载
export function download(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/download',
        method: 'post',
        data
    });
}

// 删除/批量删除
export function deleteFission(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/del',
        method: 'post',
        data,
        noNeedLoading: true
    });
}

// 活动开始/结束
export function changeStatus(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/change-status',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
// 参与者列表
export function getParticipants(data: any) {
    return request({
        url: 'scrm-api/console/market/fission/participant-new',
        method: 'post',
        data
    });
}
// 新建活动
export function fissionCreate(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/create',
        method: 'post',
        data
    });
}
// 查看活动
export function fissionLook(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/info',
        method: 'post',
        data
    });
}
// 编辑活动
export function fissionEdit(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/edit',
        method: 'post',
        data
    });
}
// 统计
export function fissionStats(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/stats',
        method: 'post',
        data
    });
}
// 统计导出
export const exportData = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/stats-export',
        method: 'post',
        data
    });
};
// 助力客户列表
export const getHelpList = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/assistList',
        method: 'POST',
        data
    });
};
// 导出助力
export const expHelpData = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/assistList/export',
        method: 'POST',
        data,
        timeout: 1000 * 60 * 5
    });
};
// 导出中奖记录
export const exportWinList = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/export-win-record',
        method: 'POST',
        data,
        timeout: 1000 * 60 * 2
    });
};
// 中奖记录
export const exportWin = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/prize-record',
        method: 'POST',
        data
    });
};
// 中奖核销
export const winVerification = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/verificate-state',
        method: 'POST',
        data
    });
};
// 任务阶段下拉列表
export const getStepList = (data: any) => {
    return request.get('/scrm-api/console/market/fission/step-list', { params: data });
};

// 导入兑奖码
export const importExChangeCode = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/import/exchange-code',
        method: 'POST',
        data
    });
};

// 导出兑奖码
export const toExportCode = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/async-export',
        method: 'POST',
        data
    });
};

// 获取修改中奖记录属性
export const getAttrList = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/get-attr-list',
        method: 'POST',
        data
    });
};

// 修改中奖记录地址
export const editAddress = (data: any) => {
    return request({
        url: '/scrm-api/console/market/fission/edit-address',
        method: 'POST',
        data
    });
};
